package com.wgy.day7;

public class Main {

    public static void main(String[] args) {

        int sum = 0;
        int i = 1;
        /*while (i <= 100) {
            sum = sum + i;
            i++;
            System.out.println(sum);
        }
        System.out.println(sum);
     System.out.println("==========");*/
        do {
            sum = sum + i;
            i++;

        } while (i <= 100);
        System.out.println(sum);
        System.out.println("===========");

        int sum1 = 0;
        for (int a = 1; a <= 100; a++) {
            sum1 = sum1 + a;


        }
        System.out.println(sum1);


    }
}
